#pragma once
#include "view\IView.h"
#include "lib\Command.h"
#include "lib\Console.h"
#include "config.h"
#include <string>
#include <vector>

class ConsoleView : public IView {
public:
  // constructors and deconstructor
  ConsoleView() {}
  ~ConsoleView() { }

  virtual int Init() { return 1; }
  virtual void Notify() {}
  virtual void SignalError(std::string errormsg) {}

  virtual void Render() {
    Console::PrintLine(content_);
    cmd_ = Console::Prompt(prefix_);
    RaiseEvent();
  }

  // commands
  void ViewPlayer() {}
  void ViewSport() {}
  void NewEntity() {}
  void DeleteEntity() {}
  void DisplaySchedule() {}
  void DisplayResults() {}
  void DisplayTable()  {}

protected:
  void set_content(std::string content) {
    content_ = content;
  }

  std::string content() {
    return content_;
  }


private:
  std::string content_;
  static std::string prefix_;
  Command cmd_;
};